type
Type
command
Summary
Simulates typing on the keyboard.
Syntax
type <string> [with <key> [, <key> [, <key> ]]]
Description
Use the type command to show text appearing in a field at typing pace or to send keyboard events to a stack.
The type command sends a rawKeyDown and rawKeyUp message to the current card for each character typed.
The type command does not automatically place an insertion point in a field, so if you want to simulate typing into a field, you must first use the select command to place the insertion point:
select after field \"Data\"
type \"Hello\"
The speed at which characters are typed is controlled by the typingRate property. To quickly put text into a field without delay, use the put command instead.
To type text into a field, you must first place the insertion point in the field using the select or click command.
As the type command is designed to emulate exactly what happens when a user types a key on the keyboard, the rawKeyDown, keyDown, rawKeyUp and keyUp messages are sent by the command. If these messages are blocked, the text will not appear in the selected field.
Parameters
Name | Type | Description |
---|---|---|
string | string | |
key | One of commandKey, controlKey, optionKey, or shiftKey. You can specify up to three keys, separated by commas. (On Windows and Unix systems, commandKey indicates the Control key.) |
Examples
type "ABC"
type field "output"
type allKeyboardKeys with shiftKey,optionKey
Related
glossary: property, current card, insertion point, command, event
message: rawKeyUp, keyDown, rawKeyDown, keyUp
object: stack
property: typingRate, blindTyping
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile